package org.ihelpuoo.lang;

import java.lang.reflect.Field;
import java.util.Comparator;

public class FieldNameComparator implements Comparator<Field>
{
	public int compare(Field f1, Field f2)
	{
		if (f1 == null && f2 == null)
			return 0;
		if (f1 == null)
			return -1;
		if (f2 == null)
			return 1;
		return StringUtils.compare(f1.getName(),f2.getName());
	}
}
